import {
  LinRouter,
  disableLoading
} from 'lin-mizar';

// import { getSafeParamId } from '../../lib/util';

import { ElevatorDao } from '../../dao/elevator';

const elevatorApi = new LinRouter({
  prefix: '/mini/elevator'
});

const elevatorDto = new ElevatorDao();

elevatorApi.get('/list', async ctx => {
  const list = await elevatorDto.getElevators();
  ctx.successData(list);
});

module.exports = { elevatorApi, [disableLoading]: false };
